import { RouteRecordRaw } from "vue-router"
import { BasicLayout, BlankLayout } from '/@/layouts'
/**
 * 系统管理模块路由
 */
const OrgAsyncRoutes: Array<RouteRecordRaw> = [
    {
        path: '/org',
        name: 'org',
        meta: {
            menuName: "系统管理",
            menuCode: "vms:org",
        },
        component: BasicLayout,
        redirect: '/org/user-service',
        children: [
            {
                path: 'user-service',
                name: 'UserService',
                meta: {
                    menuName: "组织与用户",
                    menuCode: "vms:org:auth:user",
                },
                component: BlankLayout,
                redirect: '/org/user-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'UserServiceIndex',
                        component: () => import('/@/views/org/user/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'UserServiceAdd',
                        component: () => import('/@/views/org/user/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'UserServiceEdit',
                        component: () => import('/@/views/org/user/form.vue'),
                    }
                ]
            },
            {
                path: 'role-service',
                name: 'RoleService',
                meta: {
                    menuName: "角色与权限",
                    menuCode: "vms:org:auth:role",
                },
                component: BlankLayout,
                redirect: '/org/role-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'RoleServiceIndex',
                        component: () => import('/@/views/org/role/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'RoleServiceAdd',
                        component: () => import('/@/views/org/role/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'RoleServiceEdit',
                        component: () => import('/@/views/org/role/form.vue'),
                    }
                ]
            },
            {
                path: 'dictionary-type-service',
                name: 'DictionaryTypeService',
                meta: {
                    menuName: "数据字典类型",
                    menuCode: "vms:org:system:dictionary-type",
                },
                component: BlankLayout,
                redirect: '/org/dictionary-type-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'DictionaryTypeServiceIndex',
                        component: () => import('/@/views/org/dictionary-type/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'DictionaryTypeServiceAdd',
                        component: () => import('/@/views/org/dictionary-type/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'DictionaryTypeServiceEdit',
                        component: () => import('/@/views/org/dictionary-type/form.vue'),
                    }
                ]
            },
            {
                path: 'app-menu-service',
                name: 'AppMenuService',
                meta: {
                    menuName: "菜单管理",
                    menuCode: "vms:org:system:app-menu",
                },
                component: BlankLayout,
                redirect: '/org/app-menu-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'AppMenuServiceIndex',
                        component: () => import('/@/views/org/app-menu/index.vue'),
                    },
                    // {
                    //     path: 'add',
                    //     name: 'AppMenuServiceAdd',
                    //     component: () => import('/@/views/org/dictionary-type/form.vue'),
                    // },
                    // {
                    //     path: 'form/:id',
                    //     name: 'AppMenuServiceForm',
                    //     component: () => import('/@/views/org/dictionary-type/form.vue'),
                    // }
                ]
            },
            {
                path: 'bomf-cache-service',
                name: 'BomfCacheService',
                meta: {
                    menuName: "数据刷新",
                    menuCode: "vms:org:system:bomf-cache",
                },
                component: BlankLayout,
                redirect: '/org/bomf-cache-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'BomfCacheServiceIndex',
                        component: () => import('/@/views/org/bomf-cache/index.vue'),
                    }
                ]
            },
            {
                path: 'job-scheduler-service',
                name: 'JobSchedulerService',
                meta: {
                    menuName: "定时任务管理",
                    menuCode: "vms:org:system:job-scheduler",
                },
                component: BlankLayout,
                redirect: '/org/job-scheduler-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'JobSchedulerServiceIndex',
                        component: () => import('/@/views/org/job-scheduler/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'JobSchedulerServiceAdd',
                        component: () => import('/@/views/org/job-scheduler/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'JobSchedulerServiceEdit',
                        component: () => import('/@/views/org/job-scheduler/form.vue'),
                    }
                ]
            },
            {
                path: 'micro-service-service',
                name: 'MicroServiceService',
                meta: {
                    menuName: "微服务管理",
                    menuCode: "vms:org:system:micro-service",
                },
                component: BlankLayout,
                redirect: '/org/micro-service-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'MicroServiceServiceIndex',
                        component: () => import('/@/views/org/micro-service/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'MicroServiceServiceAdd',
                        component: () => import('/@/views/org/micro-service/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'MicroServiceServiceEdit',
                        component: () => import('/@/views/org/micro-service/form.vue'),
                    }
                ]
            },
            {
                path: 'security-anonymous-service',
                name: 'SecurityAnonymousService',
                meta: {
                    menuName: "匿名访问清单列表",
                    menuCode: "vms:org:system:security-anonymous",
                },
                component: BlankLayout,
                redirect: '/org/security-anonymous-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'SecurityAnonymousServiceIndex',
                        component: () => import('/@/views/org/security-anonymous/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'SecurityAnonymousServiceAdd',
                        component: () => import('/@/views/org/security-anonymous/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'SecurityAnonymousServiceEdit',
                        component: () => import('/@/views/org/security-anonymous/form.vue'),
                    }
                ]
            },
            {
                path: 'jxudp-data-source-service',
                name: 'JxudpDataSourceService',
                meta: {
                    menuName: "多数据源管理",
                    menuCode: "vms:org:system:jxudp-data-source",
                },
                component: BlankLayout,
                redirect: '/org/jxudp-data-source-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'JxudpDataSourceServiceIndex',
                        component: () => import('/@/views/org/jxudp-data-source/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'JxudpDataSourceServiceAdd',
                        component: () => import('/@/views/org/jxudp-data-source/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'JxudpDataSourceServiceEdit',
                        component: () => import('/@/views/org/jxudp-data-source/form.vue'),
                    }
                ]
            },
            {
                path: 'oauth2-client-details-service',
                name: 'Oauth2ClientDetailsService',
                meta: {
                    menuName: "oauth2客户端配置",
                    menuCode: "vms:org:system:oauth2-client-details",
                },
                component: BlankLayout,
                redirect: '/org/oauth2-client-details-service/index',
                children: [
                    {
                        path: 'index',
                        name: 'Oauth2ClientDetailsServiceIndex',
                        component: () => import('/@/views/org/oauth2-client-details/index.vue'),
                    },
                    {
                        path: 'add',
                        name: 'Oauth2ClientDetailsServiceAdd',
                        component: () => import('/@/views/org/oauth2-client-details/form.vue'),
                    },
                    {
                        path: 'form/:id',
                        name: 'Oauth2ClientDetailsServiceEdit',
                        component: () => import('/@/views/org/oauth2-client-details/form.vue'),
                    }
                ]
            }
        ]
    }
]

export default OrgAsyncRoutes